package com.zy.cat.controller.mall.v1;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.zy.cat.common.annotation.CheckDevPermission;
import com.zy.cat.common.annotation.CheckingMD5;
import com.zy.cat.entity.dev.CatDevUserInfo;
import com.zy.cat.entity.dev.resp.CatDevUserInfoResp.TLJInfo;
import com.zy.cat.entity.dev.resp.CatDevWelfareInfoResp;
import com.zy.cat.entity.dtk.GoodsDetail;
import com.zy.cat.entity.dtk.GoodsTopic;
import com.zy.cat.entity.dtk.SuperCategory;
import com.zy.cat.entity.dtk.SuperCategory.Category;
import com.zy.cat.entity.dtk.resp.GoodsActivityListResp;
import com.zy.cat.entity.dtk.resp.GoodsActivityResp;
import com.zy.cat.entity.dtk.resp.GoodsListResp;
import com.zy.cat.entity.dtk.resp.GoodsNineResp;
import com.zy.cat.entity.dtk.resp.GoodsRankListResp;
import com.zy.cat.entity.dtk.resp.GoodsTopicListResp;
import com.zy.cat.entity.hdk.HdkGoodsItem;
import com.zy.cat.entity.hdk.HdkSuperCategory;
import com.zy.cat.entity.mall.repository.TKTLJGoodsOrdersRepository;
import com.zy.cat.entity.mall.resp.CatBansResp;
import com.zy.cat.entity.mall.resp.CatDouYinVideoResp;
import com.zy.cat.entity.mall.resp.CatGoodsCategoryResp;
import com.zy.cat.entity.mall.resp.CatHdkDuoyinResp;
import com.zy.cat.entity.mall.resp.CatHdkRatesUrlResp;
import com.zy.cat.entity.mall.resp.CatHomeTemplateResp;
import com.zy.cat.entity.mall.resp.CatTalentArticleResp;
import com.zy.cat.entity.mall.resp.CatTalentInfoResp;
import com.zy.cat.entity.mall.resp.FlashSaleGoodsResp;
import com.zy.cat.entity.mall.resp.TKSelectionResp;
import com.zy.cat.entity.mall.resp.TKTLJConvertResp;
import com.zy.cat.entity.mall.resp.TKTLJGoodsResp;
import com.zy.cat.entity.mall.resp.ZTKShopResp;
import com.zy.cat.entity.resp.Pages;
import com.zy.cat.entity.resp.RSPE;
import com.zy.cat.entity.resp.ResultPage;
import com.zy.cat.entity.tb.resp.TKMaterialResp;
import com.zy.cat.entity.tb.resp.TKTQGResp;
import com.zy.cat.entity.wy.CatShopCouponInfo;
import com.zy.cat.entity.wy.CatShopItemResp;
import com.zy.cat.entity.wy.TKConvertResp;
import com.zy.cat.service.CacheService;
import com.zy.cat.service.CatDevService;
import com.zy.cat.service.CatMallService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

/**
 * 
 * @info
 * @author Link
 * @date 2019-11-12 16:31
 */
@Api(value = "cat_mall_goods", tags = { "9趣猫淘宝商城开放API" }, description = "9趣猫淘宝商城开放接口")
@RestController
@RequestMapping("/v1/mall/goods")
@Slf4j
public class CatGoodsController {

	@Autowired
	CacheService cacheService;

	@Autowired
	CatMallService catMallService;

	@Autowired
	CatDevService catDevService;

	@Autowired
	TKTLJGoodsOrdersRepository tKTLJGoodsOrdersRepository;

	@PostMapping("/bans")
	@ApiOperation(value = "获取首页banner信息", consumes = "application/x-www-form-urlencoded", notes = "获取首页banner信息[包含N个banner条,10个小图，2个组合h5]", position = 1, response = CatBansResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(uuid_rtype_sex_uuid_time)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "uuid_rtype_sex_uuid", MD5 = "token")
	public Object bansList(Integer rtype, Integer sex, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1)) {
			return new RSPE<TKSelectionResp>(-3, "性别参数错误！");
		}
		Callable<RSPE<List<CatBansResp>>> result = new Callable<RSPE<List<CatBansResp>>>() {
			@Override
			public RSPE<List<CatBansResp>> call() throws Exception {
				return new RSPE<List<CatBansResp>>(catMallService.getBanners(sex));
			}
		};
		return result;
	}

	@PostMapping("/today/tj")
	@ApiOperation(value = "获取今日推荐商品信息", consumes = "application/x-www-form-urlencoded", notes = "今日推荐商品列表", position = 2, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男、10.全部", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_sex_rtype_sex_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_sex_rtype_sex_uuid_rtype", MD5 = "token")
	public Object tjList(Integer rtype, Integer sex, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1 && sex != 10)) {
			return new RSPE<TKSelectionResp>(-3, "性别参数错误！");
		}
		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(catMallService.getTodayTJList(rtype, sex, pages));
			}
		};
		return result;
	}

	@PostMapping("/wl/list")
	@ApiOperation(value = "根据物料ID获取物料信息", consumes = "application/x-www-form-urlencoded", notes = "获取物料综合信息", position = 3, response = TKMaterialResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "imei", value = "设备IMEI,IOS传IDFA", example = "35956464654", dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男、10.全部", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "materialId", value = "物料Id,大额券-9660、高佣榜-13366", example = "13366", dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_sex_rtype_imei_sex_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_sex_rtype_imei_sex_uuid_rtype", MD5 = "token")
	public Object wlList(Integer rtype, Integer sex, String imei, Integer materialId, String uuid, String token,
			Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<TKMaterialResp>(-2, "应用平台参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1 && sex != 10)) {
			return new RSPE<TKMaterialResp>(-3, "性别参数错误！");
		}
		if (materialId == null) {
			return new RSPE<TKMaterialResp>(-4, "物料id参数不能为空！");
		}
		Callable<RSPE<ResultPage<TKMaterialResp>>> result = new Callable<RSPE<ResultPage<TKMaterialResp>>>() {
			@Override
			public RSPE<ResultPage<TKMaterialResp>> call() throws Exception {
				return new RSPE<ResultPage<TKMaterialResp>>(
						catMallService.getWLList(rtype, imei, sex, materialId, pages));
			}
		};
		return result;
	}

	@PostMapping("/ddq/list")
	@ApiOperation(value = "获取咚咚抢商品信息", consumes = "application/x-www-form-urlencoded", notes = "获取咚咚抢商品信息", position = 3, response = TKTQGResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "stime", value = "最早开抢时间(2019-11-13 10:00:00)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_stime_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_stime_uuid_rtype", MD5 = "token")
	public Object ddqList(Integer rtype, String stime, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<TKTQGResp>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(stime)) {
			return new RSPE<List<TKTQGResp>>(-3, "开抢时间参数错误！");
		}
		try {
			new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(stime).getTime();
		} catch (ParseException e) {
			return new RSPE<List<TKTQGResp>>(-3, "开抢时间参数错误！");
		}

		Callable<RSPE<List<TKTQGResp>>> result = new Callable<RSPE<List<TKTQGResp>>>() {
			@Override
			public RSPE<List<TKTQGResp>> call() throws Exception {
				return new RSPE<List<TKTQGResp>>(catMallService.getTQGList(rtype, stime, pages));
			}
		};
		return result;
	}

	@PostMapping("/convert")
	@ApiOperation(value = "商品高佣转链", consumes = "application/x-www-form-urlencoded", notes = "商品高佣转链,必须用户登录", position = 5, response = TKConvertResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "pid", value = "登录返回字段", example = "5380881829", dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "utoken", value = "登录返回字段", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "ctype", value = "APP平台(0.九趣猫、1.淘淘集、2.一陶)", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "vscode", value = "APP版本号", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "APP友盟渠道ID", example = "chan101", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "imei", value = "手机IMEI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "imsi", value = "手机IMSI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "ftype", value = "补贴红包类型(-1.无、0.0元购、1.3元无门槛、2.15元无门槛、3.大额券订单、4.9.9订单)", example = "300", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "fcode", value = "补贴红包金额（分），0~2000", example = "300", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sid", value = "商品ID", example = "10027317366", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "rid", value = "用户渠道关系ID", example = "2132166327", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_utoken_vscode_cid_imei_sid_pid_uuid_ftype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_utoken_vscode_cid_imei_sid_pid_uuid_ftype", MD5 = "token")
	@CheckDevPermission
	public Object getGoodsConvert(Integer ctype, Integer rtype, Integer ftype, String vscode, String cid, String imei,
			String imsi, Long fcode, String sid, String rid, String pid, String utoken, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<TKConvertResp>(-2, "应用平台参数错误！");
		}
		if (ftype == null || ftype < -1 || ftype > 4) {
			return new RSPE<TKConvertResp>(-8, "补贴红包类型错误！");
		}
		if (StringUtils.isBlank(vscode)) {
			return new RSPE<TKConvertResp>(-3, "APP版本号参数错误！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<TKConvertResp>(-4, "友盟渠道ID参数错误！");
		}
		if (StringUtils.isBlank(sid)) {
			return new RSPE<TKConvertResp>(-5, "商品ID参数错误！");
		}
		if (StringUtils.isBlank(rid)) {
			return new RSPE<TKConvertResp>(-6, "用户渠道关系ID参数错误！");
		}
		if (fcode == null || fcode < 0 || fcode > 20000) {
			return new RSPE<TKConvertResp>(-7, "补贴红包参数不符合规范！");
		}
		Callable<RSPE<TKConvertResp>> result = new Callable<RSPE<TKConvertResp>>() {
			@Override
			public RSPE<TKConvertResp> call() throws Exception {
				return new RSPE<TKConvertResp>(catMallService.getGoodsConvert(ctype, rtype, ftype, vscode, cid, imei,
						imsi, fcode, sid, rid, pid));
			}
		};
		return result;
	}

	@PostMapping("/tlj/convert")
	@ApiOperation(value = "淘礼金商品高佣转链", consumes = "application/x-www-form-urlencoded", notes = "商品高佣转链,必须用户登录", position = 5, response = TKTLJConvertResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "pid", value = "登录返回字段", example = "5380881829", dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "utoken", value = "登录返回字段", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "ctype", value = "APP平台(0.九趣猫、1.淘淘集、2.一陶)", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "vscode", value = "APP版本号", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "APP友盟渠道ID", example = "chan101", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "imei", value = "手机IMEI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "imsi", value = "手机IMSI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "fcode", value = "红包金额（分），1~10000", example = "300", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sid", value = "商品ID", example = "10027317366", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "ttype", value = "领取类型（0 新人补贴；1.邀请好友补贴）", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "783e600c27dd1827b8f8538f84fa456f", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_utoken_vscode_cid_sid_ttype_pid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_utoken_vscode_cid_sid_ttype_pid_uuid", MD5 = "token")
	@CheckDevPermission
	public Object getTLJConvert(Integer ctype, Integer rtype, String vscode, String cid, String imei, String imsi,
			Long fcode, String sid, Integer ttype, String pid, String utoken, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(vscode)) {
			return new RSPE<Object>(-3, "APP版本号参数错误！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<Object>(-4, "友盟渠道ID参数错误！");
		}
		if (StringUtils.isBlank(sid)) {
			return new RSPE<Object>(-5, "商品ID参数错误！");
		}
		if (ttype != 0 && ttype != 1) {
			return new RSPE<Object>(-6, "领取参数错误！");
		}
//		if (fcode==null||fcode<1||fcode>10000) {
//			return new RSPE<Object>(-7, "红包参数不符合规范！");
//		}
		TKTLJGoodsResp goods = catMallService.getTLJGoods(sid);
		if (goods == null) {
			return new RSPE<Object>(-8, "此商品已下架！请刷新后重试");
		}
		if (goods.getTlj() != fcode) {
			return new RSPE<Object>(-7, "红包参数错误！");
		}

//		long tlj=tKTLJGoodsOrdersRepository.getTLK(pid);
//		if(tlj+fcode>3000) {
//			return new RSPE<Object>(-10, "补贴红包不足！");
//		}

		TLJInfo tljInfo = catMallService.getTLJInfo(pid);
		if (tljInfo != null) {
			if (ttype == 0 && tljInfo.getLtlj() == 0) {
				return new RSPE<Object>(-9, "您已经没有可用次数了！");
			} else if (ttype == 0 && tljInfo.getIsshow() == 0) {
				return new RSPE<Object>(-9, "您已经不在有效时间了！");
			} else if (ttype == 1 && tljInfo.getCount() == 0) {
				return new RSPE<Object>(-9, "您已经没有可用次数了！");
			}
		}

		Callable<RSPE<TKTLJConvertResp>> result = new Callable<RSPE<TKTLJConvertResp>>() {
			@Override
			public RSPE<TKTLJConvertResp> call() throws Exception {
				TKTLJConvertResp result = catMallService.getTLJConvert(goods, ctype, rtype, vscode, cid, imei, imsi,
						fcode, sid, pid, ttype);
				if (result == null) {
					return new RSPE<TKTLJConvertResp>(-9, "此商品已下架！请刷新后重试");
				}
				return new RSPE<TKTLJConvertResp>(result);
			}
		};
		return result;
	}

	@PostMapping("/detail")
	@ApiOperation(value = "商品详情", consumes = "application/x-www-form-urlencoded", notes = "商品详情", position = 6, response = GoodsDetail.class, responseContainer = "Map")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sid", value = "商品ID", example = "10027317366", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_sid_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_sid_uuid_rtype", MD5 = "token")
	public Object getGoodsDetail(Integer rtype, String sid, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<GoodsDetail>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(sid)) {
			return new RSPE<GoodsDetail>(-3, "商品ID参数错误！");
		}

		Callable<RSPE<GoodsDetail>> result = new Callable<RSPE<GoodsDetail>>() {
			@Override
			public RSPE<GoodsDetail> call() throws Exception {
				return new RSPE<GoodsDetail>(catMallService.getGoodsDetail(rtype, sid));
			}
		};
		return result;
	}

	@PostMapping("/nine/list")
	@ApiOperation(value = "9.9包邮商品", consumes = "application/x-www-form-urlencoded", notes = "9.9包邮商品，每页默认50条", position = 6, response = GoodsNineResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "nineCid", value = "9.9精选的类目id，分类id请求详情：-1-精选，1 -居家百货，2 -美食，3 -服饰，4 -配饰，5 -美妆，6 -内衣，7 -母婴，8 -箱包，9 -数码配件，10 -文娱车品", example = "-1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1，其他传请求返回字段【pageNum】的值", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小", example = "20", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_uuid", MD5 = "token")
	public Object getGoodsNine(Integer rtype, Integer nineCid, String pageNum, Integer pageSize, String uuid,
			String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<GoodsNineResp>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isAllBlank(pageNum) || pageSize == null) {
			return new RSPE<GoodsNineResp>(-3, "分页参数错误！");
		}
		Callable<RSPE<GoodsNineResp>> result = new Callable<RSPE<GoodsNineResp>>() {
			@Override
			public RSPE<GoodsNineResp> call() throws Exception {
				return new RSPE<GoodsNineResp>(catMallService.getGoodsNine(rtype, nineCid, pageNum, pageSize));
			}
		};
		return result;
	}

	@PostMapping("/rank/list")
	@ApiOperation(value = "获取大淘客排行榜信息", notes = "前100条排行榜信息", consumes = "application/x-www-form-urlencoded", position = 7, response = GoodsRankListResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cat", value = "（仅对实时榜单、全天榜单有效）1 -女装，2 -母婴，3 -美妆，4 -居家日用，5 -鞋品，6 -美食，7 -文娱车品，8 -数码家电，9 -男装，10 -内衣，11 -箱包，12 -配饰，13 -户外运动，14 -家装家纺", example = "0", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "ctype", value = "榜单类型(1.实时榜、 2.全天榜、 3.热推榜、4.复购榜)", example = "1", dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(rtype_rtype_uuid_ctype_cat_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "rtype_rtype_uuid_ctype_cat", MD5 = "token")
	public Object rankList(Integer ctype, Integer rtype, String cat, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<GoodsRankListResp>>(-2, "应用平台参数错误！");
		}
		if (ctype == null) {
			return new RSPE<List<GoodsRankListResp>>(-3, "榜单类型未指定！");
		}
		if (StringUtils.isAllBlank(cat)) {
			return new RSPE<List<GoodsRankListResp>>(-4, "商品类目未指定！");
		}
		return new Callable<RSPE<List<GoodsRankListResp>>>() {
			@Override
			public RSPE<List<GoodsRankListResp>> call() throws Exception {
				return new RSPE<List<GoodsRankListResp>>(catMallService.dtkRankList(ctype, rtype, cat));
			}
		};
	}

	@PostMapping("/list")
	@ApiOperation(value = "根据分类获取商品信息", notes = "商品类型(根据商品类型API获取 ),API若number类型返回-1，则该商品为联盟商品", consumes = "application/x-www-form-urlencoded", position = 9, response = GoodsListResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cat", value = "商品一级类目(根据商品类目API获取 )", example = "1", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "subcat", value = "商品二级类目[0.全部](根据商品类目API获取 )", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "otype", value = "排序方式(0.人气、1.最新、2.销量、3.价格（低到高）、4.价格（高到低）)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(rtype_uuid_cat_subcat_otype_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_uuid_cat_subcat_otype", MD5 = "token")
	public Object list(Integer rtype, String cat, String subcat, Integer otype, String uuid, String token,
			Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<GoodsListResp>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(cat) || StringUtils.isBlank(subcat)) {
			return new RSPE<ResultPage<GoodsListResp>>(-3, "商品类目未指定！");
		}
		if (otype == null) {
			return new RSPE<ResultPage<GoodsListResp>>(-4, "排序方式未指定！");
		}
		return new Callable<RSPE<ResultPage<GoodsListResp>>>() {
			@Override
			public RSPE<ResultPage<GoodsListResp>> call() throws Exception {
				return new RSPE<ResultPage<GoodsListResp>>(
						catMallService.dtkGoodsList(rtype, cat, subcat, otype, pages));
			}
		};
	}

	@PostMapping("/cat/list")
	@ApiOperation(value = "获取商品类目信息", notes = "获取商品类目信息", consumes = "application/x-www-form-urlencoded", position = 10, response = SuperCategory.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(uuid_rtype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "uuid_rtype_uuid", MD5 = "token")
	public Object catList(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		return new Callable<RSPE<List<Category>>>() {
			@Override
			public RSPE<List<Category>> call() throws Exception {
				return new RSPE<List<Category>>(cacheService.getDTKSuperCategory());
			}
		};
	}

	@PostMapping("/search")
	@ApiOperation(value = "商品搜索", notes = "商品搜索", consumes = "application/x-www-form-urlencoded", position = 11, response = GoodsListResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "stype", value = "搜索类型(0-综合结果，1-大淘客商品，2-联盟商品)", example = "0", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1，其他传请求返回字段【pageNum】的值", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "isCoupon", value = "优惠券(0-全部，1-有)", example = "0", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小", example = "20", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sword", value = "搜索关键词", example = "1", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "otype", value = "排序方式(1.销量（低到高）、2.销量（高到低）、3.价格（低到高）、4.价格（高到低）)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(rtype_uuid_stype_pageNum_pageSize_otype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "rtype_uuid_stype_pageNum_pageSize_otype_uuid", MD5 = "token")
	public Object search(@RequestParam(name = "isCoupon", defaultValue = "0") Integer isCoupon, Integer rtype,
			Integer stype, String pageNum, Integer pageSize, String sword, Integer otype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<GoodsListResp>>(-2, "应用平台参数错误！");
		}
		if (stype == null || (stype != 0 && stype != 1 && stype != 2)) {
			return new RSPE<ResultPage<GoodsListResp>>(-3, "搜索类型参数错误！");
		}
		if (otype == null) {
			return new RSPE<ResultPage<GoodsListResp>>(-4, "排序方式未指定！");
		}
		if (StringUtils.isAllBlank(pageNum)) {
			return new RSPE<ResultPage<GoodsListResp>>(-5, "分页方式未指定！");
		}
		if (pageSize == null || pageSize < 1) {
			return new RSPE<ResultPage<GoodsListResp>>(-5, "分页大小参数错误！");
		}
		return new Callable<RSPE<ResultPage<GoodsListResp>>>() {
			@Override
			public RSPE<ResultPage<GoodsListResp>> call() throws Exception {
				return new RSPE<ResultPage<GoodsListResp>>(
						catMallService.search(isCoupon, rtype, stype, pageNum, pageSize, sword, otype));
			}
		};
	}

	@PostMapping("/hotword")
	@ApiOperation(value = "热搜记录", notes = "商品热搜记录", consumes = "application/x-www-form-urlencoded", position = 12, response = String.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1(默认不分页)", example = "1", required = false, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小(默认不分页)", example = "30", required = false, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(rtype_uuid_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "rtype_uuid_uuid", MD5 = "token")
	public Object hotSearch(Integer rtype, Integer pageNum, Integer pageSize, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<String>>(-2, "应用平台参数错误！");
		}
		return new Callable<RSPE<List<String>>>() {
			@Override
			public RSPE<List<String>> call() throws Exception {
				return new RSPE<List<String>>(catMallService.hotSearch(rtype, pageNum, pageSize));
			}
		};
	}

	@PostMapping("/searchword")
	@ApiOperation(value = "搜索联想词", notes = "搜索联想词", consumes = "application/x-www-form-urlencoded", position = 13, response = Map.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "stype", value = "搜索类型(1.大淘客搜索 2.联盟搜索 3.超级搜索)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "kw", value = "搜索关键词", example = "女装", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(rtype_uuid_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "rtype_uuid_uuid", MD5 = "token")
	public Object searchWord(Integer rtype, Integer stype, String kw, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<Map<String, Object>>>(-2, "应用平台参数错误！");
		}
		if (stype == null || (stype != 1 && stype != 2 && stype != 3)) {
			return new RSPE<List<Map<String, Object>>>(-3, "搜索类型参数错误！");
		}
		if (StringUtils.isBlank(kw)) {
			return new RSPE<List<Map<String, Object>>>(-4, "搜索关键词不能为空！");
		}
		return new Callable<RSPE<List<Map<String, Object>>>>() {
			@Override
			public RSPE<List<Map<String, Object>>> call() throws Exception {
				return new RSPE<List<Map<String, Object>>>(catMallService.getSearchWord(rtype, stype, kw));
			}
		};
	}

	@PostMapping("/like/list")
	@ApiOperation(value = "猜你喜欢", consumes = "application/x-www-form-urlencoded", notes = "猜你喜欢", position = 14, response = GoodsListResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "imei", value = "手机IMEI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "imsi", value = "手机IMSI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "sid", value = "商品ID", example = "10027317366", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "size", value = "商品数量(10~100之间)", example = "30", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_imei_sid_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_imei_sid_uuid_rtype", MD5 = "token")
	public Object getGoodsLike(Integer rtype, Integer size, String imei, String imsi, String sid, String uuid,
			String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<GoodsListResp>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(sid)) {
			return new RSPE<GoodsListResp>(-3, "商品ID参数错误！");
		}
		if (size == null || size < 10 || size > 100) {
			return new RSPE<GoodsListResp>(-4, "商品数量参数错误！");
		}
		Callable<RSPE<List<GoodsListResp>>> result = new Callable<RSPE<List<GoodsListResp>>>() {
			@Override
			public RSPE<List<GoodsListResp>> call() throws Exception {
				return new RSPE<List<GoodsListResp>>(catMallService.getGoodsLike(rtype, imei, imsi, sid, size));
			}
		};
		return result;
	}

	@PostMapping("/topic")
	@ApiOperation(value = "精选专辑列表", consumes = "application/x-www-form-urlencoded", notes = "精选专辑", position = 15, response = GoodsTopic.Opts.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_uuid_rtype", MD5 = "token")
	public Object getGoodsTopic(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<GoodsTopic.Opts>>(-2, "应用平台参数错误！");
		}
		Callable<RSPE<List<GoodsTopic.Opts>>> result = new Callable<RSPE<List<GoodsTopic.Opts>>>() {
			@Override
			public RSPE<List<GoodsTopic.Opts>> call() throws Exception {
				return new RSPE<List<GoodsTopic.Opts>>(catMallService.getGoodsTopic());
			}
		};
		return result;
	}

	@PostMapping("/topic/list")
	@ApiOperation(value = "精选专辑商品列表", consumes = "application/x-www-form-urlencoded", notes = "精选专辑", position = 16, response = GoodsTopicListResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小（10~100）", example = "0", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1，其他传请求返回字段【pageNum】的值", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "topicId", value = "专辑ID，根据精选专辑列表API获取", example = "", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_pageSize_topicId_pageNum_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_pageSize_topicId_pageNum_uuid", MD5 = "token")
	public Object getGoodsTopicList(Integer rtype, Integer pageSize, String topicId, String pageNum, String uuid,
			String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<GoodsTopicListResp>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(topicId)) {
			return new RSPE<GoodsTopicListResp>(-3, "专辑ID参数错误！");
		}
		if (pageSize == null || pageSize < 10 || pageSize > 100) {
			return new RSPE<GoodsTopicListResp>(-4, "分页大小参数错误！");
		}
		if (StringUtils.isBlank(pageNum)) {
			return new RSPE<GoodsTopicListResp>(-5, "分页参数错误！");
		}
		Callable<RSPE<GoodsTopicListResp>> result = new Callable<RSPE<GoodsTopicListResp>>() {
			@Override
			public RSPE<GoodsTopicListResp> call() throws Exception {
				return new RSPE<GoodsTopicListResp>(
						catMallService.getGoodsTopicList(rtype, pageSize, topicId, pageNum));
			}
		};
		return result;
	}

	@PostMapping("/acts")
	@ApiOperation(value = "热门活动列表", consumes = "application/x-www-form-urlencoded", notes = "热门活动列表", position = 16, response = GoodsActivityResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_uuid", MD5 = "token")
	public Object getActs(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<GoodsActivityResp>(-2, "应用平台参数错误！");
		}
		Callable<RSPE<GoodsActivityResp>> result = new Callable<RSPE<GoodsActivityResp>>() {
			@Override
			public RSPE<GoodsActivityResp> call() throws Exception {
				return new RSPE<GoodsActivityResp>(catMallService.getActs(rtype));
			}
		};
		return result;
	}

	@PostMapping("/acts/list")
	@ApiOperation(value = "热门活动商品列表", consumes = "application/x-www-form-urlencoded", notes = "热门活动商品列表", position = 17, response = GoodsActivityListResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小（10~100）", example = "10", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1，其他传请求返回字段【pageNum】的值", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "actId", value = "活动ID，根据精选专辑列表API获取", example = "", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_pageSize_actId_pageNum_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_pageSize_actId_pageNum_uuid", MD5 = "token")
	public Object getActsGoodsList(Integer rtype, Integer pageSize, String pageNum, String actId, String uuid,
			String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<GoodsActivityListResp>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(actId)) {
			return new RSPE<GoodsActivityListResp>(-3, "活动ID参数错误！");
		}
		if (pageSize == null || pageSize < 10 || pageSize > 100) {
			return new RSPE<GoodsActivityListResp>(-4, "分页大小参数错误！");
		}
		if (StringUtils.isBlank(pageNum)) {
			return new RSPE<GoodsActivityListResp>(-5, "分页参数错误！");
		}
		Callable<RSPE<GoodsActivityListResp>> result = new Callable<RSPE<GoodsActivityListResp>>() {
			@Override
			public RSPE<GoodsActivityListResp> call() throws Exception {
				return new RSPE<GoodsActivityListResp>(
						catMallService.getActsGoodsList(rtype, pageSize, pageNum, actId));
			}
		};
		return result;
	}

	@PostMapping("/sales/zoro/cats")
	@ApiOperation(value = "零元购商品类目列表", consumes = "application/x-www-form-urlencoded", notes = "零元购商品类目列表", position = 18, response = Map.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_uuid_time)", example = "8538f84fa4500c27dd186f783e627b8f", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_uuid", MD5 = "token")
	public Object getZoroGoodsCats(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<String>>(-2, "应用平台参数错误！");
		}
		Callable<RSPE<List<Map<String, String>>>> result = new Callable<RSPE<List<Map<String, String>>>>() {
			@Override
			public RSPE<List<Map<String, String>>> call() throws Exception {
				return new RSPE<List<Map<String, String>>>(catMallService.getFavoritesList("0"));
			}
		};
		return result;
	}

	@PostMapping("/sales/zoro/list")
	@ApiOperation(value = "零元购商品列表", consumes = "application/x-www-form-urlencoded", notes = "零元购商品列表", position = 19, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男、10.全部", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "零元购类目ID，根据API获取", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_sex_sex_cid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_sex_sex_cid_uuid", MD5 = "token")
	public Object getZoroGoodsList(Integer rtype, Integer sex, String cid, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-3, "零元购类目ID参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1 && sex != 10)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-4, "性别参数错误！");
		}

		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(catMallService.getZoroGoodsList(rtype, cid, sex, pages));
			}
		};
		return result;
	}

	@PostMapping("/sales/three/cats")
	@ApiOperation(value = "3元无门槛商品类目列表", consumes = "application/x-www-form-urlencoded", notes = "3元无门槛商品类目列表", position = 20, response = Map.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_uuid_time)", example = "8538f84fa4500c27dd186f783e627b8f", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_uuid", MD5 = "token")
	public Object getThreeGoodsCats(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<String>>(-2, "应用平台参数错误！");
		}
		Callable<RSPE<List<Map<String, String>>>> result = new Callable<RSPE<List<Map<String, String>>>>() {
			@Override
			public RSPE<List<Map<String, String>>> call() throws Exception {
				return new RSPE<List<Map<String, String>>>(cacheService.getFavoritesList(3));
			}
		};
		return result;
	}

	@PostMapping("/sales/three/list")
	@ApiOperation(value = "3元无门槛商品列表", consumes = "application/x-www-form-urlencoded", notes = "3元无门槛商品列表", position = 21, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男、10.全部", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "3元购类目ID，根据API获取", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_sex_sex_cid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_sex_sex_cid_uuid", MD5 = "token")
	public Object getThreeGoodsList(Integer rtype, Integer sex, String cid, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-3, "类目ID参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1 && sex != 10)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-4, "性别参数错误！");
		}

		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(catMallService.getThreeGoodsList(rtype, cid, sex, pages));
			}
		};
		return result;
	}

	@PostMapping("/sales/fifteen/cats")
	@ApiOperation(value = "15元商品类目列表", consumes = "application/x-www-form-urlencoded", notes = "3元无门槛商品类目列表", position = 22, response = Map.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_uuid_time)", example = "8538f84fa4500c27dd186f783e627b8f", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_uuid", MD5 = "token")
	public Object getFifteenGoodsCats(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<String>>(-2, "应用平台参数错误！");
		}
		Callable<RSPE<List<Map<String, String>>>> result = new Callable<RSPE<List<Map<String, String>>>>() {
			@Override
			public RSPE<List<Map<String, String>>> call() throws Exception {
				return new RSPE<List<Map<String, String>>>(cacheService.getFavoritesList(4));
			}
		};
		return result;
	}

	@PostMapping("/sales/fifteen/list")
	@ApiOperation(value = "15元无门槛商品列表", consumes = "application/x-www-form-urlencoded", notes = "3元无门槛商品列表", position = 23, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男、10.全部", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "15元购类目ID，根据API获取", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_sex_sex_cid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_sex_sex_cid_uuid", MD5 = "token")
	public Object getFifteenGoodsList(Integer rtype, Integer sex, String cid, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-3, "类目ID参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1 && sex != 10)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-4, "性别参数错误！");
		}

		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(
						catMallService.getFifteenGoodsList(rtype, cid, sex, pages));
			}
		};
		return result;
	}

	@PostMapping("/daily/surprise/cats")
	@ApiOperation(value = "每日惊喜商品类目列表", consumes = "application/x-www-form-urlencoded", notes = "每日惊喜商品类目列表", position = 24, response = Map.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_uuid_time)", example = "8538f84fa4500c27dd186f783e627b8f", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_uuid", MD5 = "token")
	public Object getDailySurpriseGoodsCats(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<String>>(-2, "应用平台参数错误！");
		}
		Callable<RSPE<List<Map<String, String>>>> result = new Callable<RSPE<List<Map<String, String>>>>() {
			@Override
			public RSPE<List<Map<String, String>>> call() throws Exception {
				return new RSPE<List<Map<String, String>>>(catMallService.getFavoritesList("2"));
			}
		};
		return result;
	}

	@PostMapping("/daily/surprise/list")
	@ApiOperation(value = "每日惊喜商品列表", consumes = "application/x-www-form-urlencoded", notes = "每日惊喜商品列表", position = 25, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男、10.全部", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "每日精选类目ID，根据API获取", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_sex_sex_cid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_sex_sex_cid_uuid", MD5 = "token")
	public Object getDailySurpriseGoodsList(Integer rtype, Integer sex, String cid, String uuid, String token,
			Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-3, "类目ID参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1 && sex != 10)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-4, "性别参数错误！");
		}

		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(
						catMallService.getDailySurpriseGoodsList(rtype, cid, sex, pages));
			}
		};
		return result;
	}

	@PostMapping("/like/shops")
	@ApiOperation(value = "拆淘客猜你喜欢", consumes = "application/x-www-form-urlencoded", notes = "猜你喜欢", position = 26, response = ZTKShopResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "imei", value = "手机IMEI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "imsi", value = "手机IMSI,IOS:IDFA", example = "862052038380307", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "idfa", value = "IOS手机IDFA", example = "862052038380307", required = false, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "sid", value = "商品ID", example = "554832820990", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小（10~100）", example = "10", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(uuid_rtype_rtype_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "uuid_rtype_rtype_uuid_rtype", MD5 = "token")
	public Object getShopLike(Integer rtype, int pageNum, Integer pageSize, String imei, String imsi, String idfa,
			String sid, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<GoodsListResp>(-2, "应用平台参数错误！");
		}
		Callable<RSPE<List<ZTKShopResp>>> result = new Callable<RSPE<List<ZTKShopResp>>>() {
			@Override
			public RSPE<List<ZTKShopResp>> call() throws Exception {
				return new RSPE<List<ZTKShopResp>>(
						catMallService.getShopLike(rtype, imei, imsi, sid, idfa, pageNum, pageSize));
			}
		};
		return result;
	}

	@PostMapping("/banner/list")
	@ApiOperation(value = "获取首页两个banner的商品列表", consumes = "application/x-www-form-urlencoded", notes = "获取首页两个banner所对应的商品列表", position = 27, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "fid", value = "选品库ID，根据API获取", example = "2012030687", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_fid_rtype_fid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_fid_rtype_fid_uuid", MD5 = "token")
	public Object getBannerGoodsList(Integer rtype, String fid, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(fid)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-3, "选品库ID参数错误！");
		}

		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(catMallService.getBannerGoodsList(rtype, fid, pages));
			}
		};
		return result;
	}

	@PostMapping("/flash/sale/list")
	@ApiOperation(value = "限时抢购商品列表", consumes = "application/x-www-form-urlencoded", notes = "限时抢购商品列表", position = 28, response = FlashSaleGoodsResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_uuid_rtype", MD5 = "token")
	public Object getFlashSaleGoodsList(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<FlashSaleGoodsResp>(-2, "应用平台参数错误！");
		}

		Callable<RSPE<List<FlashSaleGoodsResp>>> result = new Callable<RSPE<List<FlashSaleGoodsResp>>>() {
			@Override
			public RSPE<List<FlashSaleGoodsResp>> call() throws Exception {
				return new RSPE<List<FlashSaleGoodsResp>>(catMallService.getFlashSaleGoodsList(rtype));
			}
		};
		return result;
	}

	@PostMapping("/flash/lower/list")
	@ApiOperation(value = "限时抢购下方商品列表", consumes = "application/x-www-form-urlencoded", notes = "限时抢购下方商品列表", position = 25, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男、10.全部", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_sex_sex_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_sex_sex_uuid", MD5 = "token")
	public Object getFlashLowerGoodsList(Integer rtype, Integer sex, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-2, "应用平台参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1 && sex != 10)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-4, "性别参数错误！");
		}

		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(catMallService.getFlashLowerGoodsList(rtype, sex, pages));
			}
		};
		return result;
	}

	@PostMapping("/flash/sale/click")
	@ApiOperation(value = "9趣猫用户点击抢购按钮", consumes = "application/x-www-form-urlencoded", position = 26, notes = "9趣猫用户点击抢购按钮", response = CatDevWelfareInfoResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pid", value = "登录返回字段", example = "5516603495", dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "sid", value = "商品ID", example = "5516603495", dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "utoken", value = "登录返回字段", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(pid_uuid_pid_utoken_time)", example = "8f85345627bf783e6008f84fac27dd18", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "pid_uuid_sid_utoken", MD5 = "token")
	@CheckDevPermission
	public Object getFlashSaleGoods(Integer rtype, String pid, String sid, String uuid, String utoken, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Boolean>(-2, "应用平台参数错误！");
		}
		/* 查看是否存在 */
		CatDevUserInfo zdev = catDevService.getCatDevUserInfoByPid(pid);
		if (zdev == null) {
			return new RSPE<Boolean>(-4, "用户信息不存在错误！");
		}

		/* 查看用户今日已领取次数 */
		Callable<RSPE<Boolean>> result = new Callable<RSPE<Boolean>>() {
			@Override
			public RSPE<Boolean> call() throws Exception {
				if (catMallService.getFlashSaleGoods(rtype, pid, sid)) {
					return new RSPE<Boolean>(1, "商品已被抢完！");
				}
				return new RSPE<Boolean>(-1, "抢购失败,请稍后重试！");
			}
		};
		return result;
	}

	@PostMapping("/coupon/list")
	@ApiOperation(value = "获取领取的优惠券列表", consumes = "application/x-www-form-urlencoded", notes = "获取领取的优惠券列表", position = 27, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pid", value = "登录返回字段", example = "5516603495", dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_pid_pid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_pid_pid_uuid", MD5 = "token")
	@CheckDevPermission
	public Object getGoodsCouponList(Integer rtype, String pid, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<TKSelectionResp>>(-2, "应用平台参数错误！");
		}

		/* 查看是否存在 */
		CatDevUserInfo zdev = catDevService.getCatDevUserInfoByPid(pid);
		if (zdev == null) {
			return new RSPE<List<TKSelectionResp>>(-4, "用户信息不存在错误！");
		}

		Callable<RSPE<List<TKSelectionResp>>> result = new Callable<RSPE<List<TKSelectionResp>>>() {
			@Override
			public RSPE<List<TKSelectionResp>> call() throws Exception {
				return new RSPE<List<TKSelectionResp>>(catMallService.getGoodsCouponList(rtype, pid));
			}
		};
		return result;
	}

	@PostMapping("/supercoupon/list")
	@ApiOperation(value = "大额券商品列表", consumes = "application/x-www-form-urlencoded", notes = "大额券商品列表", position = 23, response = TKSelectionResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_uuid_rtype", MD5 = "token")
	public Object getSupercouponGoodsList(Integer rtype, String uuid, String token, Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<ResultPage<TKSelectionResp>>(-2, "应用平台参数错误！");
		}

		Callable<RSPE<ResultPage<TKSelectionResp>>> result = new Callable<RSPE<ResultPage<TKSelectionResp>>>() {
			@Override
			public RSPE<ResultPage<TKSelectionResp>> call() throws Exception {
				return new RSPE<ResultPage<TKSelectionResp>>(catMallService.getSupercouponGoodsList(rtype, pages));
			}
		};
		return result;
	}

	@PostMapping("/category/list")
	@ApiOperation(value = "获取商品类目列表", consumes = "application/x-www-form-urlencoded", notes = "获取商品类目列表", position = 24, response = CatGoodsCategoryResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "vscode", value = "APP版本号", example = "116", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_uuid_rtype", MD5 = "token")
	public Object getCategoryList(Integer rtype, String uuid, String token,
			@RequestParam(name = "vscode", defaultValue = "0") Integer vscode) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<CatGoodsCategoryResp>>(-2, "应用平台参数错误！");
		}

		Callable<RSPE<List<CatGoodsCategoryResp>>> result = new Callable<RSPE<List<CatGoodsCategoryResp>>>() {
			@Override
			public RSPE<List<CatGoodsCategoryResp>> call() throws Exception {
				return new RSPE<List<CatGoodsCategoryResp>>(catMallService.getCategoryList(rtype, vscode));
			}
		};
		return result;
	}

	@PostMapping("/tlj/list")
	@ApiOperation(value = "获取淘礼金商品信息", consumes = "application/x-www-form-urlencoded", notes = "淘礼金商品列表", position = 25, response = TKTLJGoodsResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pid", value = "用户ID,登录返回字段", example = "5380881829", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "ttype", value = "领取类型", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "utoken", value = "登录返回字段", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8600c27dd18538f84fa456f783e", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_rtype_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_rtype_uuid_rtype", MD5 = "token")
	@CheckDevPermission
	public Object tljGoodsList(Integer rtype, String pid, Integer ttype, String uuid, String token, String utoken,
			Pages pages) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(pid)) {
			return new RSPE<Object>(-3, "pid参数错误！");
		}
		if (ttype == null || (ttype != 0 && ttype != 1)) {
			return new RSPE<Object>(-4, "ttype参数错误！");
		}

		Callable<RSPE<ResultPage<TKTLJGoodsResp>>> result = new Callable<RSPE<ResultPage<TKTLJGoodsResp>>>() {
			@Override
			public RSPE<ResultPage<TKTLJGoodsResp>> call() throws Exception {
				return new RSPE<ResultPage<TKTLJGoodsResp>>(catMallService.tljGoodsList(pid, rtype, pages, ttype));
			}
		};
		return result;
	}

	@PostMapping("/share/info")
	@ApiOperation(value = "微信分享商品链接", consumes = "application/x-www-form-urlencoded", notes = "淘礼金商品列表", position = 26, response = RSPE.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "ctype", value = "APP平台(0.九趣猫、1.淘淘集、2.一陶)", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "stype", value = "商品类型(0.淘宝、1.拼多多、2.京东)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pid", value = "用户ID", example = "0", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "p", value = "商品参数（淘口令、短链接）", example = "1", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "utoken", value = "登录返回字段", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_stype_pid_uuid_rtype_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_stype_pid_uuid_rtype", MD5 = "token")
	@CheckDevPermission
	public Object getGoodsWeShare(Integer rtype, Integer stype, Integer ctype, String pid, String p, String utoken,
			String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (ctype == null || (ctype < 0 || ctype > 2)) {
			return new RSPE<Object>(-2, "APP平台错误！");
		}
		if (stype == null || (stype < 0 || stype > 2)) {
			return new RSPE<Object>(-3, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(p)) {
			return new RSPE<Object>(-4, "商品参数错误！");
		}
		Callable<RSPE<String>> result = new Callable<RSPE<String>>() {
			@Override
			public RSPE<String> call() throws Exception {
				String re = catMallService.getGoodsWeShare(ctype, rtype, stype, pid, p);
				if (StringUtils.isBlank(re)) {
					return new RSPE<String>(-9, "网络超时，请重试！");
				}
				return new RSPE<String>(re);
			}
		};
		return result;
	}

	@PostMapping("/clipboard/search")
	@ApiOperation(value = "商品搜索/转链搜索(粘贴板搜索)", consumes = "application/x-www-form-urlencoded", notes = "转链搜索用于,进入app首页智能搜索", position = 27, response = GoodsListResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "ctype", value = "APP平台(0.九趣猫、1.淘淘集、2.一陶)", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "vscode", value = "APP版本号", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "APP友盟渠道ID", example = "chan101", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "para", value = "淘口令/短连接/商品标题", example = "10027317366", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "rid", value = "用户渠道关系ID", example = "2132166327", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_vscode_cid_para_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_vscode_cid_para_uuid", MD5 = "token")
	public Object getGoodsClipboardSearch(Integer ctype, Integer rtype, String vscode, String cid, String para,
			String rid, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<TKConvertResp>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(vscode)) {
			return new RSPE<TKConvertResp>(-3, "APP版本号参数错误！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<TKConvertResp>(-4, "友盟渠道ID参数错误！");
		}
		if (StringUtils.isBlank(para)) {
			return new RSPE<TKConvertResp>(-5, "商品para参数错误！");
		}
		Callable<RSPE<GoodsListResp>> result = new Callable<RSPE<GoodsListResp>>() {
			@Override
			public RSPE<GoodsListResp> call() throws Exception {
				return new RSPE<GoodsListResp>(
						catMallService.getGoodsClipboardSearch(ctype, rtype, vscode, cid, rid, para));
			}
		};
		return result;
	}

	@GetMapping("/hdk/ratesurl/itemid/{itemid}")
	@ApiOperation(value = "好单库转链", consumes = "application/x-www-form-urlencoded", notes = "PC端商品转链", position = 28, response = CatHdkRatesUrlResp.class, responseContainer = "Map")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "itemid", value = "商品ID", example = "251201515454", required = true, dataType = "String", paramType = "path") })
	public Object hdkRatesurl(@PathVariable("itemid") String itemid) {
		if (StringUtils.isBlank(itemid)) {
			return new RSPE<TKConvertResp>(-1, "商品id参数错误！");
		}
		Callable<RSPE<CatHdkRatesUrlResp>> result = new Callable<RSPE<CatHdkRatesUrlResp>>() {
			@Override
			public RSPE<CatHdkRatesUrlResp> call() throws Exception {
				return new RSPE<CatHdkRatesUrlResp>(catMallService.hdkRatesurl(itemid));
			}
		};
		return result;
	}

	@PostMapping("/home/data")
	@ApiOperation(value = "获取首页banner渲染数据", consumes = "application/x-www-form-urlencoded", notes = "获取首页banner渲染数据", position = 29, response = CatHomeTemplateResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sex", value = "性别0.女、1.男", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pid", value = "用户pid", example = "123456555", required = false, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(uuid_rtype_sex_uuid_time)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "uuid_rtype_sex_uuid", MD5 = "token")
	public Object homeList(Integer rtype, Integer sex, String pid, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (sex == null || (sex != 0 && sex != 1)) {
			return new RSPE<TKSelectionResp>(-3, "性别参数错误！");
		}
		Callable<RSPE<CatHomeTemplateResp>> result = new Callable<RSPE<CatHomeTemplateResp>>() {
			@Override
			public RSPE<CatHomeTemplateResp> call() throws Exception {
				return new RSPE<CatHomeTemplateResp>(catMallService.getHomeTemplateList(pid, sex));
			}
		};
		return result;
	}

	@PostMapping("/hdk/cat/list")
	@ApiOperation(value = "好单库获取商品类目信息", notes = "获取商品类目信息", consumes = "application/x-www-form-urlencoded", position = 30, response = SuperCategory.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(uuid_rtype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "uuid_rtype_uuid", MD5 = "token")
	public Object hdkCatList(Integer rtype, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		return new Callable<RSPE<List<HdkSuperCategory>>>() {
			@Override
			public RSPE<List<HdkSuperCategory>> call() throws Exception {
				return new RSPE<List<HdkSuperCategory>>(cacheService.getHDKSuperCategory());
			}
		};
	}

	@PostMapping("/hdk/keyword/items")
	@ApiOperation(value = "好单库获取关键词商品页信息", notes = "获取关键词商品页信息", consumes = "application/x-www-form-urlencoded", position = 31, response = SuperCategory.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1，其他传请求返回字段【pageNum】的值", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sort", value = "0.综合（最新），1.券后价(低到高)，2.券后价（高到低），3.券面额，4.销量，5.佣金比例，6.券面额（低到高），7.月销量（低到高），8.佣金比例（低到高），9.全天销量（高到低），10全天销量（低到高），11.近2小时销量（高到低），12.近2小时销量（低到高），13.优惠券领取量（高到低），14.好单库指数（高到低）", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "0全部，1女装，2男装，3内衣，4美妆，5配饰，6鞋品，7箱包，8儿童，9母婴，10居家，11美食，12数码，13家电，14其他，15车品，16文体", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "keyword", value = "搜索关键词", example = "1", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小", example = "20", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(sort_keyword_rtype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "sort_keyword_rtype_uuid", MD5 = "token")
	public Object getHdkKeywordItems(Integer rtype, String keyword, Integer sort, Integer cid, Integer pageNum,
			Integer pageSize, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isEmpty(keyword)) {
			return new RSPE<Object>(-3, "搜索关键词不能为空！");
		}
		if (sort == null || sort < 0 || sort > 14) {
			return new RSPE<Object>(-4, "排序参数错误！");
		}
		if (cid == null || cid < 0) {
			return new RSPE<Object>(-4, "分类ID参数错误！");
		}
		if (pageNum == null || pageNum < 0) {
			return new RSPE<Object>(-5, "分页参数错误！");
		}
		if (pageSize == null || pageSize < 0) {
			return new RSPE<Object>(-6, "分页大小参数错误！");
		}
		return new Callable<RSPE<ResultPage<HdkGoodsItem>>>() {
			@Override
			public RSPE<ResultPage<HdkGoodsItem>> call() throws Exception {
				return new RSPE<ResultPage<HdkGoodsItem>>(
						catMallService.getHdkKeywordItems(keyword, cid, sort, pageNum, pageSize));
			}
		};
	}

	@PostMapping("/talent/info")
	@ApiOperation(value = "获取达人说页面数据", notes = "获取达人说页面数据", consumes = "application/x-www-form-urlencoded", position = 32, response = CatTalentInfoResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "talentcat", value = "大家都在逛类目，文章类别（0.全部，1.好物,2.潮流,3.美食,4.生活）", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(talentcat_talentcat_rtype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "talentcat_talentcat_rtype_uuid", MD5 = "token")
	public Object getTalentInfo(Integer rtype, Integer talentcat, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (talentcat == null || talentcat < 0) {
			return new RSPE<Object>(-3, "文章类别参数错误！");
		}
		return new Callable<RSPE<CatTalentInfoResp>>() {
			@Override
			public RSPE<CatTalentInfoResp> call() throws Exception {
				return new RSPE<CatTalentInfoResp>(catMallService.getTalentInfo(talentcat));
			}
		};
	}

	@PostMapping("/talent/article")
	@ApiOperation(value = "获取达人说文章数据", notes = "获取达人说文章数据", consumes = "application/x-www-form-urlencoded", position = 32, response = CatTalentInfoResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "id", value = "达人文章ID", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(id_rtype_id_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "id_rtype_id_uuid", MD5 = "token")
	public Object getTalentArticle(Integer rtype, Integer id, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (id == null || id < 0) {
			return new RSPE<Object>(-3, "文章参数错误！");
		}
		return new Callable<RSPE<CatTalentArticleResp>>() {
			@Override
			public RSPE<CatTalentArticleResp> call() throws Exception {
				return new RSPE<CatTalentArticleResp>(catMallService.getTalentArticle(id));
			}
		};
	}

	@PostMapping("/hdk/item/list")
	@ApiOperation(value = "好单库获取商品列表", notes = "好单库获取商品列表", consumes = "application/x-www-form-urlencoded", position = 31, response = SuperCategory.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1，其他传请求返回字段【pageNum】的值", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "sort", value = "0.综合（最新），1.券后价(低到高)，2.券后价（高到低），3.券面额（高到低），4.月销量（高到低），5.佣金比例（高到低），6.券面额（低到高），7.月销量（低到高），8.佣金比例（低到高），9.全天销量（高到低），10全天销量（低到高），11.近2小时销量（高到低），12.近2小时销量（低到高），13.优惠券领取量（高到低）", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "0全部，1女装，2男装，3内衣，4美妆，5配饰，6鞋品，7箱包，8儿童，9母婴，10居家，11美食，12数码，13家电，14其他，15车品，16文体，17宠物", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "nav", value = "默认是全部商品1（1实时跑单商品，2爆单榜商品，3全部商品，4纯视频单，5聚淘专区）", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageSize", value = "分页大小", example = "20", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(sort_keyword_rtype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "sort_keyword_rtype_uuid", MD5 = "token")
	public Object getHdkItemList(Integer rtype, Integer nav, Integer sort, Integer cid, Integer pageNum,
			Integer pageSize, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (nav == null || nav < 0 || nav > 5) {
			return new RSPE<Object>(-3, "参数nav错误！");
		}
		if (sort == null || sort < 0 || sort > 14) {
			return new RSPE<Object>(-4, "排序参数错误！");
		}
		if (cid == null || cid < 0) {
			return new RSPE<Object>(-4, "分类ID参数错误！");
		}
		if (pageNum == null || pageNum < 0) {
			return new RSPE<Object>(-5, "分页参数错误！");
		}
		if (pageSize == null || pageSize < 0) {
			return new RSPE<Object>(-6, "分页大小参数错误！");
		}
		return new Callable<RSPE<ResultPage<HdkGoodsItem>>>() {
			@Override
			public RSPE<ResultPage<HdkGoodsItem>> call() throws Exception {
				return new RSPE<ResultPage<HdkGoodsItem>>(
						catMallService.getHdkItemList(nav, cid, sort, pageNum, pageSize));
			}
		};
	}

	@PostMapping("/hdk/duoyin/items")
	@ApiOperation(value = "好单库获取商品抖音列表", notes = "好单库获取商品抖音列表", consumes = "application/x-www-form-urlencoded", position = 31, response = CatDouYinVideoResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageNum", value = "分页，第一页传1，其他传请求返回字段【pageNum】的值", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "itemId", value = "商品Id", example = "1", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(rtype_itemId_rtype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "rtype_itemId_rtype_uuid", MD5 = "token")
	public Object getHdkDuoyinItems(Integer rtype, String itemId, Integer pageNum, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isEmpty(itemId)) {
			return new RSPE<Object>(-3, "参数itemId错误！");
		}
		if (pageNum == null || pageNum < 0) {
			return new RSPE<Object>(-5, "分页参数错误！");
		}
		return new Callable<RSPE<List<CatDouYinVideoResp>>>() {
			@Override
			public RSPE<List<CatDouYinVideoResp>> call() throws Exception {
				return new RSPE<List<CatDouYinVideoResp>>(catMallService.getHdkDuoyinItems(itemId, pageNum));
			}
		};
	}

	@PostMapping("/temp/convert")
	@ApiOperation(value = "其他产品商品临时高佣转链接口", consumes = "application/x-www-form-urlencoded", notes = "商品高佣转链", position = 5, response = TKConvertResp.class, responseContainer = "List")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "vscode", value = "APP版本号", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "sid", value = "商品ID", example = "10027317366", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_vscode_sid_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_vscode_sid_uuid", MD5 = "token")
	public Object getGoodsConvertInfo(Integer rtype, String vscode, String sid, String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<TKConvertResp>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(vscode)) {
			return new RSPE<TKConvertResp>(-3, "APP版本号参数错误！");
		}
		if (StringUtils.isBlank(sid)) {
			return new RSPE<TKConvertResp>(-5, "商品ID参数错误！");
		}
		Callable<RSPE<TKConvertResp>> result = new Callable<RSPE<TKConvertResp>>() {
			@Override
			public RSPE<TKConvertResp> call() throws Exception {
				return new RSPE<TKConvertResp>(catMallService.getGoodsConvertInfo(rtype, vscode, sid));
			}
		};
		return result;
	}

	@PostMapping("hdk/rank/list")
	@ApiOperation(value = "获取好单库排行榜信息", notes = "前100条排行榜信息", position = 2, response = HdkGoodsItem.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "stype", value = "榜单类型，1是实时销量榜（近2小时销量），2是今日爆单榜，3是昨日爆单榜，4是出单指数版", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "back", value = "每页返回条数（请在1,2,10,20,50,100中选择一个数值返回，最多返回top100条数据）", example = "20", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "min_id", value = "分页，来源于上次获取后的数据的min_id值，默认开始请求值为1", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "商品类目： 0全部，1女装，2男装，3内衣，4美妆，5配饰，6鞋品，7箱包，8儿童，9母婴，10居家，11美食，12数码，13家电，14其他，15车品，16文体，17宠物（支持多类目筛选，如1,2获取类目为女装、男装的商品，逗号仅限英文逗号）", example = "0", required = false, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "item_type", value = "是否只获取营销返利商品，1是，0否（-1不筛选）", example = "-1", required = false, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(stype_uuid_rtype_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "stype_uuid_rtype", MD5 = "token")
	public Object rankList(Integer rtype, Integer stype, Integer back, Integer min_id, Integer cid, Integer item_type,
			String uuid, String token) {
		if (rtype == null) {
			return new RSPE<Object>(-2, "用户类型未指定！");
		}
		if (stype == null || stype < 1 || stype > 4) {
			return new RSPE<Object>(-3, "榜单类型未指定！");
		}
		if (min_id == null || min_id < 1) {
			return new RSPE<Object>(-4, "分页错误！");
		}
		if (back == null || !("1,2,10,20,50,100").contains("" + back)) {
			return new RSPE<Object>(-5, "每页返回条数错误！");
		}
		return new Callable<List<HdkGoodsItem>>() {
			@Override
			public List<HdkGoodsItem> call() throws Exception {
				return catMallService.hdkRankList(rtype, stype, back, min_id, cid, item_type);
			}
		};

	}

	@PostMapping("/hdk/duoyin/data")
	@ApiOperation(value = "好单库获取抖货商品", notes = "抖货商品", consumes = "application/x-www-form-urlencoded", position = 31, response = CatDouYinVideoResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cat_id", value = "商品类目(0热门，1百变穿搭，2时尚潮男，3舒适好物，4美妆达人，5魅力配饰，6步履不停，7包罗万象，8萌娃驾到，9宝妈神器，10居家好物，11吃货专区，12数码达人，13用电能手，15伴你前行，16学习娱乐，17萌宠世界，14其他\r\n"
					+ "（对应好单库商品类目：0全部，1女装，2男装，3内衣，4美妆，5配饰，6鞋品，7箱包，8儿童，9母婴，10居家，11美食，12数码，13家电，14其他，15车品，16文体，17宠物)", example = "1", required = true, dataType = "Integer", paramType = "form"),
			@ApiImplicitParam(name = "min_id", value = "作为请求地址中获取下一页的参数值，默认是1", example = "1", required = true, dataType = "Integer", paramType = "form"),
			@ApiImplicitParam(name = "back", value = "每页返回条数（请在1,2,5,10,20,50,100中选择一个数值返回，最多一页返回100条数据）（默认是10）", example = "10", required = true, dataType = "Integer", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "UUID随机数", example = "61609ff6266c5c67ccdebd06c7aab4d4", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "请求验证密钥MD5(rtype_rtype_uuid_time)", example = "8075e77f93562e0d54ae6fc1bd69f3bb", required = true, dataType = "String", paramType = "form") })

	@CheckingMD5(checkingStr = "rtype_rtype_uuid", MD5 = "token")
	public Object getHdkDuoyinData(Integer rtype, String uuid, String token, Integer cat_id, Integer min_id,
			Integer back) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<Object>(-2, "应用平台参数错误！");
		}
		if (cat_id == null || cat_id < 0) {
			return new RSPE<Object>(-3, "商品类目错误！");
		}
		if (min_id == null || min_id < 0) {
			return new RSPE<Object>(-5, "分页参数错误！");
		}
		if (back == null || back < 0) {
			return new RSPE<Object>(-5, "返回条数错误！");
		}
		return new Callable<RSPE<List<CatHdkDuoyinResp>>>() {
			@Override
			public RSPE<List<CatHdkDuoyinResp>> call() throws Exception {
				return new RSPE<List<CatHdkDuoyinResp>>(catMallService.getHdkDuoyinData(rtype, cat_id, min_id, back));
			}
		};
	}
	
	@PostMapping("/shopcoupon")
	@ApiOperation(value = "淘宝天猫店铺优惠券查询(---收费接口未购买---)", consumes = "application/x-www-form-urlencoded", notes = "查询淘宝天猫店铺优惠券", position = 27, response = CatShopCouponInfo.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "utoken", value = "登录返回字段", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "ctype", value = "APP平台(0.九趣猫、1.淘淘集、2.一陶)", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "APP友盟渠道ID", example = "chan101", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "itemId", value = "淘宝或天猫的商品ID", example = "chan101", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "sellerId", value = "店铺ID", example = "2132166327", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_vscode_itemId_sellerId_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_vscode_itemId_sellerId_uuid", MD5 = "token")
	public Object getShopCoupon(Integer ctype,Integer rtype, String cid,String itemId,String sellerId,String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<CatShopCouponInfo>>(-2, "应用平台参数错误！");
		}
		if (StringUtils.isBlank(itemId)) {
			return new RSPE<List<CatShopCouponInfo>>(-3, "淘宝或天猫的商品ID不存在！");
		}
		if (StringUtils.isBlank(sellerId)) {
			return new RSPE<List<CatShopCouponInfo>>(-4, "店铺ID不存在！");
		}
		if (StringUtils.isBlank(cid)) {
			return new RSPE<TKConvertResp>(-4, "友盟渠道ID参数错误！");
		}
		Callable<RSPE<CatShopCouponInfo>> result = new Callable<RSPE<CatShopCouponInfo>>() {
			@Override
			public RSPE<CatShopCouponInfo> call() throws Exception {
				return new RSPE<CatShopCouponInfo>(
						catMallService.getShopCoupon(rtype,ctype,itemId,sellerId));
			}
		};
		return result;
	}
	
	@PostMapping("/shop/items")
	@ApiOperation(value = "淘宝店铺商品查询(---收费接口未购买---)", consumes = "application/x-www-form-urlencoded", notes = "查询淘宝店铺商品", position = 27, response = CatShopItemResp.class)
	@ApiImplicitParams({
			@ApiImplicitParam(name = "utoken", value = "登录返回字段", example = "1001", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "ctype", value = "APP平台(0.九趣猫、1.淘淘集、2.一陶)", example = "1", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "cid", value = "APP友盟渠道ID", example = "chan101", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "rtype", value = "应用平台(0.安卓、1.IOS)", example = "0", required = true, dataType = "int", paramType = "form"),
			@ApiImplicitParam(name = "pageno", value = "页码", example = "chan101", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "userId", value = "店铺ID(sellerId)", example = "2132166327", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "uuid", value = "MD5(随机数)", example = "27b8f8538f84fa456f783e600c27dd18", required = true, dataType = "String", paramType = "form"),
			@ApiImplicitParam(name = "token", value = "MD5(rtype_pageno_userId_uuid_time)", example = "1001", required = true, dataType = "String", paramType = "form") })
	@CheckingMD5(checkingStr = "rtype_pageno_userId_uuid", MD5 = "token")
	public Object getShopItem(Integer rtype, Integer ctype,String cid,String pageno, String userId,String uuid, String token) {
		if (rtype == null || (rtype != 0 && rtype != 1)) {
			return new RSPE<List<CatShopItemResp>>(-2, "应用平台参数错误！");
		}if (StringUtils.isBlank(cid)) {
			return new RSPE<TKConvertResp>(-3, "友盟渠道ID参数错误！");
		}
		if (StringUtils.isBlank(userId)) {
			return new RSPE<List<CatShopItemResp>>(-4, "店铺ID不存在！");
		}
		Callable<RSPE<ResultPage<CatShopItemResp>>> result = new Callable<RSPE<ResultPage<CatShopItemResp>>>() {
			@Override
			public RSPE<ResultPage<CatShopItemResp>> call() throws Exception {
				return new RSPE<ResultPage<CatShopItemResp>>(
						catMallService.getShopItem(rtype,ctype,pageno, userId));
			}
		};
		return result;
	}
}
